import { createRouter, createWebHistory } from 'vue-router'
import LayoutView from "../views/LayoutView.vue"
import MathView from '../views/MathView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "layout",
      component: LayoutView,
      children: [
        {
          path: '/',
          name: 'math',
          component: MathView
        },
        {
          path: "/collect",
          name: "collect",
          component: () => import("../views/CollectView.vue")
        },
        {
          path: "/wrong",
          name: "wrong",
          component: () => import("../views/WrongView.vue")
        },
        {
          path: "/addwx",
          name: "addwx",
          component: () => import("../views/AddWXView.vue")
        }
      ]
    },
    {
      path:"/playvideo/:id/:courseID?/:type?",
      name:"video",
      component:() => import("../views/VideoView.vue")
    }
  ]
})

export default router
